package com.study.observermode.observer;

import com.study.observermode.subject.Subject;

/**
 * @ClassName: OctalObserver
 * @Description:
 * @Details:
 * @Author: 郑港旭
 * @Create: 2021-11-16 14:51
 **/
public class OctalObserver extends Observer{
    public OctalObserver(Subject subject){
        this.subject = subject;
        subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Octal String:" + Integer.toOctalString(subject.getState()));
    }
}
